package org.ix.dynamicapis.configure.models;

import lombok.Data;
import org.apache.ibatis.mapping.MappedStatement;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@Data
public class ApiSqlModel implements Serializable {

    public ApiSqlModel() {
        defaultValues = new HashMap<>();
    }

    /**
     * sql返回结果 (1:List, 2:Object)
     */
    private Integer resultType;

    /**
     * 是否可以缓存(0否, 1是)
     */
    private boolean cacheable;

    /**
     * 缓存时长 (单位:分钟)
     */
    private int cacheTime;

    private MappedStatement ms;
    private Map<String, Object> defaultValues;
    private long timestamp;
    private ApiModel apiModel;
}
